﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace Name_H
{
    class Program
    {
        static void Main(string[] args)
        {
            //一维数组
            int[] arr= new int[5];
            for (int i=0;i<arr.Length;i++)
            {
                Console.WriteLine(arr[1]);
            }

            int[] arr1 = new int[3] {1,2,3 };
            for (int i = 0;i<arr1.Length;i++)
            {
                Console.WriteLine (arr1 [i ]);
            }

            int[] arr2 = { 1, 23, 3 };
            for (int i = 0;i<arr2.Length;i++)
            {
                Console.WriteLine(arr2[i]);
            }
            //foreach的用法
            int[] fibarray = new int[] { 1, 2, 3, 45, 6 };
            foreach (int i in fibarray)
            {
                System.Console.Write(i);
            }
            //split的用法
            string str = "今天你很飘呀";
            string[] sArrsy = str.Split('A');
            var a = str.Split(',');
            for (int i = 0; i < a.Length; i++)
            {
                Console.WriteLine(a[i]);
            }
        }
    }
}
